package cn.lizemin.entity.demo;

import cn.hutool.json.JSONUtil;
import cn.lizemin.entity.User;
import cn.lizemin.service.UserApi;
import cn.lzm.proxy.UserServiceProxy;

/**
 * @author lzm
 * @Date 2024/7/20
 * @description
 */
public class ConsumerTest {

    /**
     * 使用静态代理来rpc调用远程接口
     * @param args
     */
    public static void main(String[] args) {
        UserApi proxy = new UserServiceProxy();
        User user = proxy.getUserById(20);
        System.out.println(JSONUtil.toJsonStr(user));
    }

}
